package glemipsc;

import java.io.Serializable;
import java.util.List;

import glemipsc.implementations.Argument;
import glemipsc.implementations.Implementation;
import glemipsc.implementations.Instruction;
import glemipsc.instructions.Expression;
import glemipsc.instructions.VariableRef;

public class ConstantPointer implements Expression, Serializable {
	private VariableRef el;
	private Type type;

	public ConstantPointer(VariableRef el) {
		this.el = el;
		type = new TypeArray(el.getType());
	}

	public Type getType() {
		return type;
	}

	public int getImmediateValue() {
		return 0;
	}

	public boolean isImmediate() {
		return false;
	}

	public Address getStoreAddress() {
		return null;
	}

	public boolean isStored() {
		return false;
	}

	public void setStoreAddress(Address addr) {
		
	}

	public int getStoredSize() {
		return 0;
	}

	public void computeInstruction(Argument result, List<Instruction> instructions, Function func) {
		el.computeAddress(result, instructions, func);
	}
}
